/*
 * @Description: 邀请页面头部
 * @Author: iamsmiling
 * @Date: 2021-06-12 15:06:48
 * @LastEditTime: 2021-06-14 17:09:03
 */
import 'package:credit_business_circle/R/R.dart';
import 'package:flutter/material.dart';

class InvitationHeader extends StatelessWidget {
  const InvitationHeader({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(top: R.dimen.dp24),
      child: Stack(
        alignment: AlignmentDirectional.center,
        children: [
          Transform.translate(
              offset: Offset(0, -kToolbarHeight),
              child: Image.asset(
                R.image.inviteCommission,
                width: R.dimen.width,
                fit: BoxFit.fill,
              )),
          Positioned(top: 0, child: Image.asset(R.image.freeVip)),
          Transform.translate(
            offset: Offset(0, -kToolbarHeight),
            child: Container(
              margin: EdgeInsets.only(top: R.dimen.dp64),
              child: Stack(
                alignment: AlignmentDirectional.center,
                children: [
                  Container(
                    width: R.dimen.width,
                    alignment: Alignment.center,
                    padding: EdgeInsets.only(right: R.dimen.dp10),
                    child: Text(
                      "5",
                      style: TextStyle(
                          fontSize: R.dimen.sp90,
                          color: R.color.ffff444b,
                          fontWeight: FontWeight.w600),
                    ),
                  ),
                  Positioned(
                    right: R.dimen.width / 2 - R.dimen.dp68 / 2,
                    bottom: R.dimen.dp18,
                    child: Container(
                        alignment: Alignment.center,
                        width: R.dimen.dp28,
                        height: R.dimen.dp28,
                        decoration: BoxDecoration(
                            gradient: LinearGradient(
                                colors: [R.color.fffe500e, R.color.fffb0c02]),
                            border:
                                Border.all(width: 1.5, color: R.color.ffffd358),
                            borderRadius:
                                BorderRadius.circular(R.dimen.dp28 / 2)),
                        child: Text(
                          "元",
                          style: TextStyle(
                              fontSize: R.dimen.sp14, color: R.color.ffffe5c6),
                        )),
                  )
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }
}
